A typical digital camera system takes raw data from an image sensor, processes that data, and stores the resulting image in a digital memory device. Typical memory devices used in digital cameras for picture storage include rotating memory such as disks, or solid state memory such as Flash EEPROM, static, or dynamic RAM. The picture memory may be permanently mounted in the camera, or may be removable, for example in the form of a cartridge or card. The picture memory is typically of a fixed size, and is partitioned into a number of picture slots for storing a predetermined number of pictures. The raw image is usually quite large in comparison to the size of the picture memory. Typically a lossy compression scheme is used to process the raw image data prior to storage, trading off image detail for the ability to store more images in the picture memory. Compression ratios from 16 to 20 to 1 are common, allowing many images to be stored in the camera, while still maintaining good image quality.
For example, assume a camera is to store 20 images in a picture memory. Each image must therefore be compressed to take up 1/20th of the memory. Typically a scalar quantization lossy compression scheme such as JPEG is used for this purpose, with some form of rate control algorithm employed to ensure that each image, once compressed, indeed fits into its allotted space in the storage. As implied by the name, in a lossy compression scheme such as JPEG, image detail is lost in the compression process.
Generally there will be some variation in the compressed image sizes. For instance in the example given, each compressed image should be approximately 1/20th of the size of the memory. Compression produces a smaller image that achieves the compromise between image quality and the size of the image data. As the user takes a picture, the raw image data is compressed and stored in the picture memory. When the user has completed taking a set of pictures, the compressed image data is transferred to another device, and the space used by those images may be freed so that other image may be stored.
In the example given, after the user has taken one picture, approximately 1/20th of the picture memory is in use and image detail has been lost, even though 19/20ths of the picture memory is unused. After ten pictures have been taken, half the picture memory is in use, image detail has been lost on each of the images, and approximately half the picture memory is unused. What is desired is a way to opportunistically exploit the unused picture memory to provide higher quality images.